package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.service.RoomStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 房态管理
 * 2024-10-24
 */
@RestController
@RequestMapping("/hotel/roomStatus")
public class RoomStatusController extends BaseController {

    @Autowired
    RoomStatusService roomStatusService;

    @GetMapping("/getRoomStatusList")
    public AjaxResult getRoomStatusList(@RequestParam Map map) {
        // 本地的酒店ID
        List<String> columnDateRange = StringUtils.getListStringByMap(map, "columnDateRange");
        String hotelId = map.get("hotelId").toString();
        return roomStatusService.getRoomStatusList(hotelId, columnDateRange);
    }
}
